package main

import "fmt"

func fib(N int)int{
	memos:=make([]int,N+1)
	return helper(memos,N)
}

func helper(memo []int,n int)int{
	if n==0 || n ==1{
		return n
	}
	if memo[n]!=0{
		return memo[n]
	}
	memo[n] =helper(memo,n-1)+helper(memo,n-2)
	return memo[n]
}

func main(){
	fmt.Println(fib(7))
}